package com.campus.wall.presenter;

import android.app.Activity;

import com.campus.wall.base.BasePresenter;
import com.campus.wall.contract.LoginContract;
import com.campus.wall.contract.SendMsgContract;
import com.campus.wall.response.MessageResponse;
import com.self.baseutile.components.ToastUtils;

import java.util.ArrayList;
import java.util.List;


/**
 * Description：
 */
public class SendMsgPresenter extends BasePresenter<SendMsgContract.View> implements SendMsgContract.Presenter {

    private Activity activity;
    private List<MessageResponse> list=new ArrayList<>();
    public SendMsgPresenter(Activity activity) {
        this.activity=activity;
    }


    public List<MessageResponse> initeMess(){
        for (int i=0;i<3;i++){
            MessageResponse messageResponse=new MessageResponse();
            if(i%2==0){
                messageResponse.setName("胡歌");
                messageResponse.setMessage("今天出来吃饭");
                messageResponse.setType(0);
                messageResponse.setImage(":mipmap/boy");
            }else {
                messageResponse.setName("刘亦菲");
                messageResponse.setMessage("晚点聊");
                messageResponse.setType(1);
                messageResponse.setImage(":mipmap/girl");
            }
            list.add(messageResponse);
        }
        return list;
    }

    @Override
    public List<MessageResponse> send(MessageResponse messageResponse) {
                list.add(list.size(),messageResponse);
                return list;
    }
}
